<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ include file="/header.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户注册</title>
</head>
<body>
<center>
	<form action="${ctx}/user/manager?func=add" method="post" onsubmit="return validate(this)">
		<p>
			用户名：<input name="username" type="text">
		</p>
		<p>
			密 &nbsp;码：<input name="password" type="password">
		</p>
		<p>
			<input type="submit" value="注册" />
			<input type="reset" value="重置" />
		</p>
	</form>
</center>
</body>
<script type="text/javascript">
	function validate(f){
   		if(f.username.value==""){
     		alert("用户名不能为空！");
     		f.username.focus();
     		return false;
    	}
   		if(f.password.value.length<4){
     		alert("密码长度必须4以上！");
     		f.password.focus();
     		return false;
    	}   
	}
</script>
</html>